package acom.test.swing.bb;

import java.util.ArrayList;
import java.util.List;

public class ATestTestdd {

	public static void main(String[] args) {

		String fname = "lkjl.txt";

		int index = fname.lastIndexOf(".");
		
		String temp=fname.substring(index+1, fname.length());
				
		System.out.println("txt".equals(temp));
		
	}
	
	public void meishigan(){
		int[] a = { 0, 1, 2, 4, 5, 7,12,13,23 };

		List<List<Integer>> totalist = new ArrayList<List<Integer>>();

		List<Integer> templist = new ArrayList<Integer>();
		for (int i = 0; i < a.length; i++) {

			if (i - 1 >= 0 && a[i] - a[(i - 1)] == 1) {
				templist.add(a[i]);
			} else {
				totalist.add(templist);

				templist = new ArrayList<Integer>();
				templist.add(a[i]);

			}

		}

		totalist.add(templist);
		totalist.remove(0);

		for (List<Integer> intlist : totalist) {

			for (int vc : intlist) {
				System.out.print(vc + ",");
			}
			System.out.println(">>>>>>>>>>>>");
		}
	}

}
